home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 4 / The Arsenal Files 4 (Arsenal Computer).ISO / gen_prog / inst103.exe / NUMBER.CFG < prev    next >
Text File  |  1994-12-21  |  544b  |  34 lines

  1. ; Number guessing game
  2.  
  3. clrscr
  4. writeln "The Number Guessing Game!"
  5. random 100 #rn
  6. :Start
  7. inc #gn
  8. writeln
  9. write "Guess #" #gn ": "
  10. put #wherex into #x
  11. put 31 into #textcolor
  12. readfield #x #wherey 3 $s
  13. put 7 into #textcolor
  14. writeln
  15. if $s = "" then Quit
  16. put $s into #g
  17. if #g > #rn then More
  18. if #g = #rn then Equal
  19. writeln "Too low."
  20. goto Done
  21. :Equal
  22. writeln
  23. write "You got it in "
  24. put 15 into #textcolor
  25. write #gn
  26. put 7 into #textcolor
  27. writeln " guesses!"
  28. goto Quit
  29. :More
  30. writeln "Too high."
  31. :Done
  32. goto Start
  33. :Quit
  34.